package com.sdry.service.impl.zc;


import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.sdry.mapper.zc.ZcDisposeRejectsMapper;
import com.sdry.model.llm.Department;
import com.sdry.model.llm.User;
import com.sdry.model.zc.ZcDisposeRejectsDetailsEntity;
import com.sdry.model.zc.ZcDisposeRejectsEntity;
import com.sdry.model.zc.ZcEvaluateEntity;
import com.sdry.model.zc.ZcGasEntity;
import com.sdry.model.zc.ZcLeakHuntingEntity;
import com.sdry.model.zc.ZcQueryCriteria;
import com.sdry.model.zc.ZcTestDetailsEntity;
import com.sdry.model.zc.ZcTestEntity;
import com.sdry.service.zc.ZcDisposeRejectsService;

/**
 * 
 * @ClassName:    ZcDisposeRejectsServiceImpl   
 * @Description:  不合格处置
 * @Author:       zc   
 * @CreateDate:   2018年9月26日 下午2:55:40   
 * @Version:      v1.0
 */
@Service
public class ZcDisposeRejectsServiceImpl implements ZcDisposeRejectsService {

	@Resource
	private ZcDisposeRejectsMapper zdMapper;

	/**
	 * 查询不合格处置列表
	 */
	@Override
	public List<ZcDisposeRejectsEntity> selectDisposeRejectsList(ZcQueryCriteria zcQueryCriteria) {
		return zdMapper.selectDisposeRejectsList(zcQueryCriteria);
	}
	/**
	 * 查询不合格处置列表数目
	 */
	@Override
	public int countDisposeRejectsList() {
		return zdMapper.countDisposeRejectsList();
	}
	/**
	 * 新增处置单
	 */
	@Override
	public int insertDisposeRejects(ZcDisposeRejectsEntity zcDisposeRejectsEntity) {
		return zdMapper.insertDisposeRejects(zcDisposeRejectsEntity);
	}
	/**
	 * 修改处置单
	 */
	@Override
	public int updateDisposeRejects(ZcDisposeRejectsEntity zcDisposeRejectsEntity) {
		return zdMapper.updateDisposeRejects(zcDisposeRejectsEntity);
	}
	/**
	 * 批量删除
	 */
	@Override
	public int delDisposeRejectsArr(long id) {
		return zdMapper.delDisposeRejectsArr(id);
	}
	/**
	 * 发起审批
	 */
	@Override
	public int sponsorApprover(ZcDisposeRejectsEntity zcDisposeRejectsEntity) {
		return zdMapper.sponsorApprover(zcDisposeRejectsEntity);
	}
	/**
	 * 通过处置单id查找详情
	 */
	@Override
	public List<ZcDisposeRejectsDetailsEntity> selectDisposeRejectsDetailsListBydId(ZcQueryCriteria zcQueryCriteria) {
		return zdMapper.selectDisposeRejectsDetailsListBydId(zcQueryCriteria);
	}
	/**
	 * 通过处置单id查找详情android
	 */
	@Override
	public List<ZcDisposeRejectsDetailsEntity> selectDisposeRejectsDetailsListBydIdAndroid(String id) {
		return zdMapper.selectDisposeRejectsDetailsListBydIdAndroid(id);
	}
	/**
	 * 通过处置单id查找详情数目
	 */
	@Override
	public int countDisposeRejectsDetailsListBydId(ZcQueryCriteria zcQueryCriteria) {
		return zdMapper.countDisposeRejectsDetailsListBydId(zcQueryCriteria);
	}
	/**
	 * 查找质检单列表
	 */
	@Override
	public List<ZcTestEntity> selectTestList(ZcQueryCriteria zcQueryCriteria) {
		return zdMapper.selectTestList(zcQueryCriteria);
	}
	/**
	 * 查找质检单列表数目
	 */
	@Override
	public int countTestList(ZcQueryCriteria zcQueryCriteria) {
		return zdMapper.countTestList(zcQueryCriteria);
	}
	/**
	 * 查找质检单
	 */
	@Override
	public ZcTestEntity selectTest(ZcQueryCriteria zqc) {
		return zdMapper.selectTest(zqc);
	}
	/**
	 * 保存处置单详情
	 */
	@Override
	public int insertDisposeRejectsDetails(ZcDisposeRejectsDetailsEntity zcDisposeRejectsDetailsEntity) {
		return zdMapper.insertDisposeRejectsDetails(zcDisposeRejectsDetailsEntity);
	}
	
	/**
	 * 修改处置单详情
	 */
	@Override
	public int updateDisposeRejectsDetails(ZcDisposeRejectsDetailsEntity zcDisposeRejectsDetailsEntity) {
		return zdMapper.updateDisposeRejectsDetails(zcDisposeRejectsDetailsEntity);
	}
	/**
	 * 删除处置单详情
	 */
	@Override
	public int delDisposeRejectsArrDetails(long id) {
		return zdMapper.delDisposeRejectsArrDetails(id);
	}
	/**
	 * 部门列表
	 */
	@Override
	public List<Department> getZtreeJson() {
		return zdMapper.getZtreeJson();
	}
	/**
	 * 人员列表
	 */
	@Override
	public List<User> getZtreeChild(long dId) {
		return zdMapper.getZtreeChild(dId);
	}
	/**
	 * 查询上次审批人
	 */
	@Override
	public ZcDisposeRejectsEntity selectHistoryApprover() {
		return zdMapper.selectHistoryApprover();
	}
	/**
	 * 通过质检单号查询检漏结果
	 * @param zcQueryCriteria
	 * @return
	 */
	@Override
	public List<ZcLeakHuntingEntity> selectLeakHuntingListByNumber(ZcQueryCriteria zcQueryCriteria) {
		return zdMapper.selectLeakHuntingListByNumber(zcQueryCriteria);
	}
	/**
	 * 通过质检单号查询检漏结果数量
	 * @param zcQueryCriteria
	 * @return
	 */
	@Override
	public int countLeakHuntingListByNumber(ZcQueryCriteria zcQueryCriteria) {
		return zdMapper.countLeakHuntingListByNumber(zcQueryCriteria);
	}
	/**
	 * 通过质检单号查询组件评价结果
	 * @param zcQueryCriteria
	 * @return
	 */
	@Override
	public List<ZcEvaluateEntity> selectEvaluateListByNumber(ZcQueryCriteria zcQueryCriteria) {
		return zdMapper.selectEvaluateListByNumber(zcQueryCriteria);
	}
	/**
	 * 通过质检单号查询组件评价结果数量
	 * @param zcQueryCriteria
	 * @return
	 */
	@Override
	public int countEvaluateListByNumber(ZcQueryCriteria zcQueryCriteria) {
		return zdMapper.countEvaluateListByNumber(zcQueryCriteria);
	}
	/**
	 * 通过质检单号查询气密性检测结果
	 * @param zcQueryCriteria
	 * @return
	 */
	@Override
	public List<ZcGasEntity> selectGasListByNumber(ZcQueryCriteria zcQueryCriteria) {
		return zdMapper.selectGasListByNumber(zcQueryCriteria);
	}
	/**
	 * 通过质检单号查询气密性检测结果数量
	 * @param zcQueryCriteria
	 * @return
	 */
	@Override
	public int countGasListByNumber(ZcQueryCriteria zcQueryCriteria) {
		return zdMapper.countGasListByNumber(zcQueryCriteria);
	}
	/**
	 * 通过质检单号查询配件检验结果
	 * @param zcQueryCriteria
	 * @return
	 */
	@Override
	public List<ZcTestDetailsEntity> selectTestListByNumber(ZcQueryCriteria zcQueryCriteria) {
		return zdMapper.selectTestListByNumber(zcQueryCriteria);
	}
	/**
	 * 通过质检单号查询配件检验结果数量
	 * @param zcQueryCriteria
	 * @return
	 */
	@Override
	public int countTestListByNumber(ZcQueryCriteria zcQueryCriteria) {
		return zdMapper.countTestListByNumber(zcQueryCriteria);
	}
	/**
	 * 通过did查询不合格处置单
	 * @param dId
	 * @return
	 */
	@Override
	public List<ZcDisposeRejectsEntity> selectDisposeRejectsBydId(long dId) {
		return zdMapper.selectDisposeRejectsBydId(dId);
	}
	/**
	 * 报废修改数点表
	 * @param code
	 * @return
	 */
	@Override
	public int updateNumbered(ZcDisposeRejectsEntity zcDisposeRejectsEntity) {
		return zdMapper.updateNumbered(zcDisposeRejectsEntity);
	}
}
